<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>

    function Person(){
        this.name='frank';

    }
    Person.prototype.aa = function(){
        console.log("aa");
    }

    var p = new Person();



    function Admin(){
        this.username = 'Admin';
    }
    Admin.prototype = p
    var a = new Admin();
    /*
    function Person(){
        this.name='frank';
        this.toString = function(){
            return '[object Person]'
        }
    }
    Person.prototype.say = function(){
        console.log(this.name)
    }
    var p1 = new Person();

    function Admin(){
        this.username = 'Admin'
        this.toString = function(){
            return '[object Admin]'
        }
    }
    Admin.prototype = p1;
//    Admin.prototype.constructor = Admin;
    var ad = new Admin();


    console.log(ad);
    console.log(ad.toString());
    console.log(ad.__proto__);
    console.log(ad.__proto__.toString());
    console.log(ad.__proto__.__proto__);
    console.log(ad.__proto__.__proto__.toString());
    console.log(ad.__proto__.__proto__.__proto__);
    console.log(ad.__proto__.__proto__.__proto__.toString());
    console.log(ad.__proto__.__proto__.__proto__.__proto__);
    console.log(ad.__proto__.__proto__.__proto__.__proto__.toString());
    */
</script>
</body>
</html>